﻿//********************************************************************
// 
//  file:  InputBox.cs
// 
//  (C) Copyright 2010, Diomede Corporation
//  All rights reserved
// 
//  Use, modification, and distribution is subject to   
//  the New BSD License (See accompanying file license.txt).
// 
//********************************************************************

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Diomede.Explorer
{
    public partial class InputBox : Form
    {
        public InputBox()
        {
            InitializeComponent();
        }

        public InputBox(string title, string message, string defaultValue, string MoreInfo)
        {
            InitializeComponent();
            this.Text = title;
            this.lblTitle.Text = message;
            this.txtString.Text = defaultValue;
            this.lblMoreInfo.Text = MoreInfo;
        }

        public static DialogResult Show(IWin32Window owner, string title, string message, string MoreInfo)
        {
            InputBox box = new InputBox( title, message, "", MoreInfo);
            
            return box.ShowDialog(owner);
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            InputString = txtString.Text;
        }

        public string InputString { get; set; }
    }
}
